<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
 <%@taglib prefix="s" uri="/struts-tags"%>
 <%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
		<div class="container">
				
				 
				<div class="panel panel-default">
					<div class="panel-heading">
						<div class="panel-title">
							<h3 class="text-center gb">我的租赁车</h3>
						</div>
					</div>
				
					
						<s:if test="#session.car != null && #session.car.size() > 0">
						<table class="table table-bordered text-center table-hover">
							<thead>
								<tr>
									<th class="text-center">书编号</th>
									<th class="text-center">书名称</th>
									<th class="text-center">租赁单价</th>
									<th class="text-center">租赁数量</th>
									<th class="text-center">删除</th>
								</tr>
							</thead>
							<tbody>
								<s:iterator id="var_item" value="#session.car">
									<tr>
										
										<td>${var_item.value.foods.foodId }</td>
										<td>${var_item.value.foods.foodName }</td>
										<td>${var_item.value.foods.foodPrice }元</td>
										<td class="car_item_td">
											<input type="text" name="quantity"  value="${var_item.value.quantity }" size="2" maxlength="5" onchange="modify_quantity(this.value,this)" class="txt_quantity"/>
											<button type="button" onclick="btn_modify(${var_item.value.foods.foodId },this)" class="btn btn-success">
												<span class="glyphicon glyphicon-wrench"/span>修改
											</button>
										</td>
										<td>
											<button type="button"  onclick="btn_delete(${var_item.value.foods.foodId})" class="btn btn-danger">
												<span class="glyphicon glyphicon-remove"></span>
												删除
											</button>
										</td>
									</tr>
								</s:iterator>
							</tbody>
						</table>
						
							<ul class="nav nav-pills bg-success nav-justified">
								<li><a href="javaScript:" onclick="a_clear_car()"><h3>清空租赁物车</h3></a></li>
								<li><a href="javaScript:history.back()" ><h3>继续租赁</h3></a></li>
								<li><a href="javaScript:" onclick="a_make_order()"><h3>生成订单</h3></a></li>
							</ul>
					
						</s:if>
						<s:else>
							<h4 class="text-center text-info">您的租赁车为空哦!快去<a href="index">租赁</a>吧!</h4>
					</s:else>
					</div>
				</div>
					
		
</body>
</html>